package cn.quang.search.toolkit.component.items.impl;

import cn.quang.search.toolkit.component.AbstractSearchItem;
import cn.quang.search.toolkit.provider.entity.QuerySlice;

import java.util.Collections;

/**
 * 自定义SQL的查询条件
 */
public class CustomSearchItem extends AbstractSearchItem {

    private final String conditionSql;

    public CustomSearchItem(String conditionSql){
       this.conditionSql = conditionSql;
    }

    @Override
    public QuerySlice getQuerySlice() {
        return QuerySlice.of(
                conditionSql,
                Collections.emptyList()
        );
    }
}
